Skip to content

Speed up test_sorting_s3_nwb_zarr (again)#4538

Merged
alejoe91 merged 1 commit intomainfrom
speedup-test_sorting_s3_nwb_zarr
Apr 20, 2026
Merged

Speed up test_sorting_s3_nwb_zarr (again)#4538
alejoe91 merged 1 commit intomainfrom
speedup-test_sorting_s3_nwb_zarr

Conversation

@chrishalcrow
Copy link
Copy Markdown
Member

@chrishalcrow chrishalcrow commented Apr 20, 2026

Replace #4537 since can't run full tests from my branch.

While investigating the speed regression for full tests from #4515, I noticed that one of our longest tests test_sorting_s3_nwb_zarr was slow (before, took 4 minutes here https://github.com/SpikeInterface/spikeinterface/actions/runs/23709486678 and after, took 15 minutes here: https://github.com/SpikeInterface/spikeinterface/actions/runs/24629667731/job/72014705334 - the reason for this regression is still unknown).

The reason is that check_sortings_equal has to stream the entire file. We can prevent this by frame_sliceing, and only doing a check_sortings_equal to the time sliced sorting. Should speed our full test suite up by 10%!

Tests: https://github.com/SpikeInterface/spikeinterface/actions/runs/24675282457

@chrishalcrow chrishalcrow added the testing Related to test routines label Apr 20, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.17%. Comparing base (8d3e274) to head (4a2a5c8).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4538   +/-   ##
=======================================
  Coverage   70.17%   70.17%           
=======================================
  Files         354      354           
  Lines       43323    43323           
=======================================
  Hits        30403    30403           
  Misses      12920    12920           
Flag Coverage Δ
unittests 70.17% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chrishalcrow
Copy link
Copy Markdown
Member Author

chrishalcrow commented Apr 20, 2026

Success! Now:

Screenshot 2026-04-20 at 17 13 41

A couple of weeks ago:

Screenshot 2026-04-20 at 17 14 42

@alejoe91 alejoe91 merged commit e1cfc4b into main Apr 20, 2026
18 checks passed
@h-mayorquin h-mayorquin deleted the speedup-test_sorting_s3_nwb_zarr branch April 20, 2026 16:32
@h-mayorquin
Copy link
Copy Markdown
Collaborator

This is great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Related to test routines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants